package com.mzkj.wanjulaile.mobile.api.modules.session.mapper;

import com.mzkj.wanjulaile.mobile.api.modules.session.entity.Session;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * session mapper
 * Created by wangxw on 2016/12/13.
 */
@Repository
public interface SessionMapper {

    int insert(Session session);

    Session findByAccessToken(String accessToken);

    Session findByRefreshToken(String refreshToken);

    int updateByAccessToken(Session session);

    int updateByRefreshToken(Session session);

    int delete(@Param("id") Long id);

    int deleteByAccount(@Param("accountId") String accountId);
}
